
package com.lee.utils; 
 
import com.alibaba.fastjson.JSON; 
import com.lee.source.HbaseSource; 
 
import java.io.IOException; 
import java.util.List; 
 
public class DMapBlackUtils { 
    private static String tableName = "marketing:dmapblack";
    private static String family = "info";
    private static String qualifier = "info";
 
 
    public static boolean judgeKeyInMap(List<String> key) throws IOException {
        key.sort(String::compareTo);
        String result = HbaseSource.get(JSON.toJSONString(key),tableName,family,qualifier);
        if(! "".equals(result)){
            return true;
        }else {
            return false;
        }
 
    }
 
 
    public static void setValueByKey(List<String> key,long value) throws IOException {
        key.sort(String::compareTo);
        HbaseSource.put(JSON.toJSONString(key),tableName,family,qualifier,Long.toString(value));
    }
 
 
 
 
 
} 
